import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Layout from '@/components/Layout'
import ChatRoom from '@/components/ChatRoom'
import Issue from '@/components/Issue'
import AdminPage from '@/components/AdminPage'
import StaffInterface from'@/components/StaffInterface'
import UserInterface from '@/components/UserInterface'
import AssignStaff from '@/components/AssignStaff'
import TimeoutNotification from '@/components/TimeoutNotification'
import Map from '@/components/Map'
import Order1  from'@/components/Order1'
import Order2 from'@/components/Order2'
import MyOrder from '@/components/MyOrder'
import UserOrder from '@/components/UserOrder'
Vue.use(Router)

export default new Router({
  routes: [

    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/layout',
      component:Layout,
    },

    {
      //管理员 子路由
      path: '/adminPage',
      component: AdminPage,
       children:[

      ]
    },
    {
      path: '/chatroom',
      component: ChatRoom
    },
    {
        //工作人员子路由
      path: '/staffInterface',
      component: StaffInterface,
      children:[
        {
          path: '/chatroom',
          component: ChatRoom
        },
        {
          path: '/map',
          component: Map
        },
        {
          path: '/order1',
          component: Order1
        },
        {
          path: '/order2',
          component: Order2
        },
        {
          path: '/myOrder',
          component: MyOrder
        },
      ]
    },
    {
      //超时通知
      path: '/timeoutNotification',
      component: TimeoutNotification
    },

    {
      path: '/userInterface',
      component: UserInterface
    },
    {
      path: '/userOrder',
      component: UserOrder
    },
    {
      path: '/issue',
      component: Issue
    }
  ]
})
